<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head><meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
    <title>6.41. IPRoute2-2.6.16-060323</title>
    <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css" media="print" />
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head>
  <body id="lfs" class="6.2">
    <div class="navheader">
      <div class="headertitles">
        <h4>Linux From Scratch - 版本 6.2</h4>
        <h3>第六章 安装系统基础软件</h3>
      </div>
      <ul class="headerlinks">
        <li class="prev">
          <a accesskey="p" href="inetutils.html" title="Inetutils-1.4.2">后退</a>
          <p>Inetutils-1.4.2</p>
        </li>
        <li class="next">
          <a accesskey="n" href="kbd.html" title="Kbd-1.12">前进</a>
          <p>Kbd-1.12</p>
        </li>
        <li class="up"><a accesskey="u" href="chapter06.html" title="第六章 安装系统基础软件">上一级</a></li>
        <li class="home"><a accesskey="h" href="../index.html" title="Linux From Scratch - 版本 6.2">首页</a></li>
      </ul>
    </div>
    <div class="wrap">
      <div class="titlepage">
        <h1 class="sect1">6.41. IPRoute2-2.6.16-060323</h1>
      </div>
      <div class="package">
        <p>IPRoute2 包含了基本的和高级的基于 IPv4 网络的程序。</p>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong><span class="segtitle">预计编译时间：</span></strong> <span class="seg">0.2 SBU</span>
            </div>
            <div class="seg">
              <strong><span class="segtitle">所需磁盘空间：</span></strong> <span class="seg">4.8 MB</span>
            </div>
          </div>
        </div>
      </div>
      <div class="installation">
        <div class="titlepage">
          <h2 class="sect2">6.41.1. 安装 IPRoute2</h2>
        </div>
        <p>编译软件包：</p>
        <pre class="userinput"><kbd class="command">make SBINDIR=/sbin</kbd></pre>
        <div class="variablelist">
          <p class="title">
            <b>make 选项的含义：</b></p>
          <dl>
            <dt>
              <span class="term"><em class="parameter"><tt>SBINDIR=/sbin</tt></em></span>
            </dt>
            <dd>
              <p>确保将 IPRoute2 包中的二进制文件安装到 <tt class="filename">/sbin</tt> 目录中以符合 FHS 标准，因为一些 IPRoute2 二进制文件将会被 LFS-Bootscripts 使用。</p>
            </dd>
          </dl>
        </div>
        <p>这个软件包没有附带测试程序。</p>
        <p>安装软件包：</p>
        <pre class="userinput"><kbd class="command">make SBINDIR=/sbin install</kbd></pre>
        <p> <span><strong class="command">arpd</strong></span> 二进制文件链接到在 <tt class="filename">/usr</tt> 目录中的Berkeley DB库，并且使用数据库 <tt class="filename">/var/lib/arpd/arpd.db</tt>。因此，按照 FHS，它必须存在于 <tt class="filename">/usr/sbin</tt>目录中。移动它到那里：</p>
        <pre class="userinput"><kbd class="command">mv -v /sbin/arpd /usr/sbin</kbd></pre>
      </div>
      <div class="content">
        <div class="titlepage">
          <a id="contents-iproute2" name="contents-iproute2"></a>
          <h2 class="sect2">6.41.2. IPRoute2 的内容</h2>
        </div>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong><span class="segtitle">安装的程序：</span></strong> <span class="seg">arpd, ctstat(→lnstat), ifcfg, ifstat, ip, lnstat, nstat, routef, routel,
              rtacct, rtmon, rtpr, rtstat(→lnstat), ss, tc.</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3><a id="id3690241" name="id3690241"></a>简要描述</h3>
          <table border="0">
            <col align="left" valign="top" />
            <tbody>
              <tr>
                <td><a id="arpd" name="arpd"></a><span class="term"><span><strong class="command">arpd</strong></span></span></td>
                <td><p>用户空间的 ARP 守护进程。用在大型网络中，那里内核空间的 ARP 实现不是很合适;或者是用在设置一个蜜罐。</p></td>
              </tr>
              <tr>
                <td><a id="ctstat" name="ctstat"></a><span class="term"><span><strong class="command">ctstat</strong></span></span></td>
                <td><p>连接状态工具</p></td>
              </tr>
              <tr>
                <td><a id="ifcfg" name="ifcfg"></a><span class="term"><span><strong class="command">ifcfg</strong></span></span></td>
                <td><p> <span><strong class="command">ip</strong></span>命令的shell脚本包装</p></td>
              </tr>
              <tr>
                <td><a id="ifstat" name="ifstat"></a><span class="term"><span><strong class="command">ifstat</strong></span></span></td>
                <td><p>显示网络接口的统计信息，包括接口发送和接收到的包数量。</p></td>
              </tr>
              <tr>
                <td><a id="ip" name="ip"></a><span class="term"><span><strong class="command">ip</strong></span></span></td>
                <td><p>主可执行程序，它包含以下几个功能：</p>
                  <p>
                    <span><strong class="command">ip link <em class="replaceable"><tt>[device]</tt></em></strong></span> 查看和修改设备状态</p>
                  <p>
                    <span><strong class="command">ip addr</strong></span> 查看地址的特性，添加新地址、删除旧地址。</p>
                  <p>
                    <span><strong class="command">ip neighbor</strong></span> 查看邻居的特性，添加新邻居、删除旧邻居。</p>
                  <p>
                    <span><strong class="command">ip rule</strong></span> 查看和修改路由规则</p>
                  <p>
                    <span><strong class="command">ip route</strong></span> 查看路由表和修改路由表规则</p>
                  <p>
                    <span><strong class="command">ip tunnel</strong></span> 查看和修改 IP 隧道及其特性</p>
                  <p>
                    <span><strong class="command">ip maddr</strong></span> 查看和修改多播地址及其特性</p>
                  <p>
                    <span><strong class="command">ip mroute</strong></span> 设置、修改、删除多播路由</p>
                  <p>
                    <span><strong class="command">ip monitor</strong></span> 不间断的监视设备状态、地址、路由</p></td>
              </tr>
              <tr>
                <td><a id="lnstat" name="lnstat"></a><span class="term"><span><strong class="command">lnstat</strong></span></span></td>
                <td><p>提供 Linux 网络统计信息，用于替代旧的 <span><strong class="command">rtstat</strong></span> 程序。</p></td>
              </tr>
              <tr>
                <td><a id="nstat" name="nstat"></a><span class="term"><span><strong class="command">nstat</strong></span></span></td>
                <td><p>显示网络统计信息</p></td>
              </tr>
              <tr>
                <td><a id="routef" name="routef"></a><span class="term"><span><strong class="command">routef</strong></span></span></td>
                <td><p><span><strong class="command">ip route</strong></span> 的一个组件，用于刷新路由表。</p></td>
              </tr>
              <tr>
                <td><a id="routel" name="routel"></a><span class="term"><span><strong class="command">routel</strong></span></span></td>
                <td><p><span><strong class="command">ip route</strong></span> 的一个组件，用于列出路由表。</p></td>
              </tr>
              <tr>
                <td><a id="rtacct" name="rtacct"></a><span class="term"><span><strong class="command">rtacct</strong></span></span></td>
                <td><p>显示 <tt class="filename">/proc/net/rt_acct</tt> 文件的内容</p></td>
              </tr>
              <tr>
                <td><a id="rtmon" name="rtmon"></a><span class="term"><span><strong class="command">rtmon</strong></span></span></td>
                <td><p>路由监视工具</p></td>
              </tr>
              <tr>
                <td><a id="rtpr" name="rtpr"></a><span class="term"><span><strong class="command">rtpr</strong></span></span></td>
                <td><p>将 <span><strong class="command">ip -o</strong></span> 的输出转换为可读的格式</p></td>
              </tr>
              <tr>
                <td><a id="rtstat" name="rtstat"></a><span class="term"><span><strong class="command">rtstat</strong></span></span></td>
                <td><p>路由状态工具</p></td>
              </tr>
              <tr>
                <td><a id="ss" name="ss"></a><span class="term"><span><strong class="command">ss</strong></span></span></td>
                <td><p>类似于 <span><strong class="command">netstat</strong></span> 命令，显示活动的连接。</p></td>
              </tr>
              <tr>
                <td><a id="tc" name="tc"></a><span class="term"><span><strong class="command">tc</strong></span></span></td>
                <td><p>流量控制，用于实现服务质量(QOS)和服务级别(COS)：</p>
                  <p>
                    <span><strong class="command">tc qdisc</strong></span> 建立排队规则</p>
                  <p>
                    <span><strong class="command">tc class</strong></span> 建立基于级别的队列调度</p>
                  <p>
                    <span><strong class="command">tc estimator</strong></span> 估算网络流量</p>
                  <p>
                    <span><strong class="command">tc filter</strong></span> 设置 QOS/COS 包过滤器</p>
                  <p>
                    <span><strong class="command">tc policy</strong></span> 设置 QOS/COS 规则
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="inetutils.html" title="Inetutils-1.4.2">后退</a>
          <p>Inetutils-1.4.2</p>
        </li>
        <li class="next">
          <a accesskey="n" href="kbd.html" title="Kbd-1.12">前进</a>
          <p>Kbd-1.12</p>
        </li>
        <li class="up"><a accesskey="u" href="chapter06.html" title="第六章 安装系统基础软件">上一级</a></li>
        <li class="home"><a accesskey="h" href="../index.html" title="Linux From Scratch - 版本 6.2">首页</a>.
        </li>
      </ul>
    </div>
</body></html>
